<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<link href="themes/css/ui.common.css" rel="stylesheet" type="text/css" />
		<link href="themes/css/ui.child.css" rel="stylesheet" type="text/css" />
		<link href="themes/css/ui.tips.css" rel="stylesheet" type="text/css" />
		<link href="style/jquery_ui/jquery-ui-1.8.custom.css" rel="stylesheet"
			type="text/css" />
		<link id="skin_css" rel="stylesheet" type="text/css"
			href="themes/css/ui.c.blue.css"></link>
		<link rel="stylesheet" href="themes/default/pagination.css"
			type="text/css"></link>
		<link rel="stylesheet" href="themes/css/ui.validation.css" type="text/css"></link>
		<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
		<script src="Scripts/jquery-ui-1.8.custom.min.js"
			type="text/javascript"></script>
		<script src="Scripts/ui.tips.js" type="text/javascript"></script>
		<script src="Scripts/ui.default.js " type="text/javascript"
			charset="UTF-8"></script>
		<script src="Scripts/ui.admincp.js" type="text/javascript"
			charset="UTF-8"></script>
		<script type="text/javascript" src="Scripts/jquery.json-2.2.min.js"></script>
		<STYLE type="text/css">
		.editorArea {
			display: none;
		}
		</STYLE>
		<script type="text/javascript" src="Scripts/ui.dialogFormHelper.js"></script>
		<script type="text/javascript" src="Scripts/ui.validation.js"></script>
		<script type="text/javascript">
			function backup(){
				$.post("dbAction!backup.action",{},function(){
					alert("当日数据库已备份");
				});
			}
			
			function load(){
				var filename = $("#txt_filename").val();
				if(filename == ''){
					alert("请填写还原日期");
					return false;
				}
				$.post("dbAction!load.action",{"filename":filename},function(){
					alert("该日数据库已还原");
				});
			}
		
		</script>
	</head>
	<body>
		<div class="PageChild_Title">
			<img src=" themes/images/default/icons/archives.png"
				class="PageChild_Tbtnpic" />
			<span class="PageChild_separate"></span>
			<span class="PageChild_TbtnText">
				<h2>备份和还原</h2>
			</span>
			<span class="PageChild_separate"></span>
			<div id="marker" class="red-tips">
			</div>
			<div class="clear">
			</div>
		</div>
		<form action="staffInfo!addStaff.action" method="post">
		<table  id="form" style="border: 1px solid gray; padding: 1px;" border="0"
			cellpadding="0" cellspacing="0" align="center">
			<tr>
				<td colspan="2" align="center">
					<input type="button" class="o-btn" onclick="backup();" value="手动备份"/>
				</td>
			</tr>
			<tr>
				<td colspan="4" align="center">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td class="text-align-right" style="width: 80px;">
					&nbsp;还原日期:
				</td>
				<td style="width: 100px" valign="middle" class="style1">
					<input id="txt_filename" name="filename" class="control-width-100">
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input id="btnSubmit" type="button" onclick="load();" class="o-btn" value="还原"/>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					&nbsp;
				</td>
			</tr>
		</table>
		</form>
		<div id="errorSummary"></div>
	</body>
</html>